package cn.itcast.day04.demo02;

import java.util.Objects;

/**
 * @author shkstart
 * @create 2020-04-20 19:25
 */
public class Person {
    private String name;
    private int age;

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o ==null || getClass() != o.getClass())
            return false;
        Person person = (Person) o;
        return age == person.age && Objects.equals(name, person.name);
    }


}
